package org.feign.client.fallback;


import org.feign.client.OrderFeign;
import org.feign.pojo.Order;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
@Component //降级方法一定要加@Component
public class OrderFeignFallback implements OrderFeign {
    //降级方法
    @Override
    public List<Order> findOrderByUserId(String username) {
        List list = new ArrayList();
        list.add("对不起，网络出现异常，这是feign的服务降级方法");
        return list;
    }
}
